// 导入路由
import { Router, Route, Switch } from 'react-router-dom';

// 导入页面组件
import Login from './pages/Login/index';
import Layouts from './pages/Layout/index';
import AuthRouter from './components/AuthRoute';
import history from 'utils/history';

// 配置路由规则
export default function App() {
  return (
    <Router history={history}>
      <div className="App">
        {/* 路由规则 */}
        <Switch>
          <Route path="/login" component={Login}></Route>
          <AuthRouter path="/" component={Layouts}></AuthRouter>
        </Switch>
      </div>
    </Router>
  );
}
